<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html class="no-js" lang="zxx">

<head>
    <meta charset="utf-8">
    <meta content="ie=edge" http-equiv="x-ua-compatible">
    <title>Beck - Furniture eCommerce Bootstrap 5 Template</title>
    <meta content="" name="description">
    <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
    <!-- Favicons -->


    <!-- ************************* CSS Files ************************* -->

    <!-- Bootstrap CSS -->
    <link href="<%=request.getContextPath() %>/senshi_official_website/static/css/bootstrap.css" rel="stylesheet">

    <!-- Vendor CSS -->
    <link href="<%=request.getContextPath() %>/senshi_official_website/static/css/vendor.css" rel="stylesheet">

    <!-- style css -->
    <link href="<%=request.getContextPath() %>/senshi_official_website/static/css/main.css" rel="stylesheet">
</head>
<style>
    #map {
        height: 250px; /* 调整地图容器的高度 */
        width: 600px; /* 调整地图容器的宽度 */
    }

    #search-input {
        width: 200px;
        height: 40px;
        padding: 0 10px;
    }

    #search-button {
        border: 1px solid transparent;
        color: #ffffff;
        background-color: #ff5151;
        border-radius: 3px;
        padding: 5px 20px;
    }

    #search-button:hover {
        background: transparent;
        border: 1px solid #ff5151;
        border-radius: 3px;
        color: #ff5151;
    }
</style>
<body>

<!-- Preloader Start -->
<div class="ft-preloader active">
    <div class="ft-preloader-inner h-100 d-flex align-items-center justify-content-center">
        <div class="ft-child ft-bounce1"></div>
        <div class="ft-child ft-bounce2"></div>
        <div class="ft-child ft-bounce3"></div>
    </div>
</div>
<!-- Preloader End -->

<!-- Main Wrapper Start -->
<div class="wrapper">
    <!-- Header Start -->
    <header class="header">
        <div class="header__inner fixed-header">
            <div class="header__main">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-12">
                            <div class="header__main-inner">
                                <div class="header__main-left">
                                    <div class="logo">
                                        <a href="<%=request.getContextPath() %>/index.jsp" class="logo--normal">
                                            <img src="<%=request.getContextPath() %>/senshi_official_website/static/logo1.png"
                                                 width="70%"
                                                 height="70%"
                                                 alt="Logo">
                                        </a>
                                    </div>
                                </div>
                                <div class="header__main-center">
                                    <nav class="main-navigation text-center d-none d-lg-block">
                                        <ul class="mainmenu">
                                            <li class="mainmenu__item menu-item-has-children">
                                                <a href="<%=request.getContextPath() %>/index.jsp"
                                                   class="mainmenu__link">
                                                    <span class="mm-text">首页</span>
                                                </a>
                                            </li>
                                            <li class="mainmenu__item menu-item-has-children megamenu-holder">
                                                <a href="<%=request.getContextPath() %>/shop-three-columns.jsp"
                                                   class="mainmenu__link">
                                                    <span class="mm-text">购物</span>
                                                </a>
                                            </li>
                                            <li class="mainmenu__item menu-item-has-children">
                                                <a href="#" class="mainmenu__link">
                                                    <span class="mm-text">个人中心</span>
                                                </a>
                                                <ul class="sub-menu">
                                                    <li>
                                                        <a href="<%=request.getContextPath() %>/goMyAccount">
                                                            <span class="mm-text">我的账号</span>
                                                        </a>
                                                    </li>
                                                    <li>
                                                        <a href="<%=request.getContextPath() %>/goCart">
                                                            <span class="mm-text">购物车</span>
                                                        </a>
                                                    </li>
                                                    <li>
                                                        <a href="<%=request.getContextPath() %>/goTracking">
                                                            <span class="mm-text">跟踪订单</span>
                                                        </a>
                                                    </li>
                                                </ul>
                                            </li>
                                            <li class="mainmenu__item">
                                                <a href="<%=request.getContextPath() %>/contact-us.jsp"
                                                   class="mainmenu__link">
                                                    <span class="mm-text">联系我们</span>
                                                </a>
                                            </li>
                                        </ul>
                                    </nav>
                                </div>
                                <div class="header__main-right">
                                    <div class="header-toolbar-wrap">
                                        <div class="header-toolbar">
                                            <div class="header-toolbar__item header-toolbar--search-btn">
                                                <a href="#searchForm" class="header-toolbar__btn toolbar-btn">
                                                    <i class="la la-search"></i>
                                                </a>
                                            </div>
                                            <div class="header-toolbar__item header-toolbar--minicart-btn">
                                                <a href="#miniCart" class="header-toolbar__btn toolbar-btn">
                                                    <i class="la la-shopping-cart"></i>
                                                    <span>01</span>
                                                </a>
                                            </div>
                                            <div class="header-toolbar__item d-block d-lg-none">
                                                <a href="#offcanvasMenu"
                                                   class="header-toolbar__btn toolbar-btn menu-btn">
                                                    <div class="hamburger-icon">
                                                        <span></span>
                                                        <span></span>
                                                        <span></span>
                                                        <span></span>
                                                        <span></span>
                                                        <span></span>
                                                    </div>
                                                </a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </header>
    <!-- Header End -->

    <!-- Breadcrumb area Start -->
    <section class="page-title-area bg-image ptb--80" data-bg-image="assets/img/bg/page_title_bg.jpg">
        <div class="container">
            <div class="row">
                <div class="col-12 text-center">
                    <h1 class="page-title">结账</h1>
                    <ul class="breadcrumb">
                        <li><a href="<%=request.getContextPath() %>/index.jsp">首页</a></li>
                        <li class="current"><span>结账</span></li>
                    </ul>
                </div>
            </div>
        </div>
    </section>
    <!-- Breadcrumb area End -->

    <!-- Main Content Wrapper Start -->
    <div class="main-content-wrapper">
        <div class="page-content-inner pt--80 pt-md--60 pb--72 pb-md--60">
            <div class="container">
                <div class="row">
                    <div class="col-12">
                        <!-- User Action Start -->
                        <div class="user-actions user-actions__coupon">
                            <div class="message-box mb--30">
                                <p><i class="la la-exclamation-circle"></i> 有优惠券吗？ <a class="expand-btn"
                                                                                           href="#coupon_info">
                                    点此输入您的优惠码</a></p>
                            </div>
                            <div class="user-actions__form hide-in-default" id="coupon_info">
                                <form action="#" class="form">
                                    <p>如果您有优惠码，请在下方输入</p>
                                    <div class="form__group d-sm-flex">
                                        <input class="form__input mr--20 mr-xs--0" id="coupon" name="coupon"
                                               placeholder="优惠码"
                                               type="text">
                                        <button class="btn btn-size-sm" type="submit">应用优惠</button>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <!-- User Action End -->
                    </div>
                </div>
                <div class="row">
                    <!-- Checkout Area Start -->
                    <div class="col-lg-6">
                        <div class="checkout-title mt--10">
                            <h2>账单明细</h2>
                        </div>
                        <div class="checkout-form">
                            <form action="#" class="form form--checkout">
                                <div class="row">
                                    <div class="form__group col-12">
                                        <label class="form__label" for="orderNotes">订单备注</label>
                                        <textarea class="form__input form__input--textarea" id="orderNotes"
                                                  name="orderNotes"
                                                  placeholder="关于您订单的补充说明"></textarea>
                                    </div>
                                </div>
                                <div class="row mb--20">
                                    <div class="form__group col-12">
                                        <h2>选择收货地址</h2>
                                        <div id="map"></div>
                                        <p>当前地址： <span id="address"></span></p>
                                        <input id="search-input" class="form__input" placeholder="搜索地址" type="text">
                                        <button id="search-button" type="button">搜索</button>
                                    </div>
                                    <script src="https://api.map.baidu.com/api?v=3.0&ak=inUVkD8RujZ04DbcOIi0KZ6HebLytyQU"></script>
                                    <script src="https://api.map.baidu.com/library/Heatmap/2.0/src/Heatmap_min.js"
                                            type="text/javascript"></script>
                                    <script>
                                        // 初始化地图
                                        let map = new BMap.Map("map");

                                        // 使用浏览器定位功能获取当前位置
                                        function getLocation() {
                                            let geolocation = new BMap.Geolocation();
                                            geolocation.getCurrentPosition(function (position) {
                                                let latitude = position.point.lat;
                                                let longitude = position.point.lng;
                                                // 创建地图中心点的坐标
                                                let centerPoint = new BMap.Point(longitude, latitude);
                                                // 将地图中心设置为当前位置
                                                map.centerAndZoom(centerPoint, 14);
                                                // 添加地图控件
                                                map.addControl(new BMap.NavigationControl());
                                                // 在地图上添加标记
                                                let marker = new BMap.Marker(centerPoint);
                                                map.addOverlay(marker);
                                                // 反向地理编码，获取地址信息
                                                let geoc = new BMap.Geocoder();
                                                geoc.getLocation(centerPoint, function (rs) {
                                                    document.getElementById("address").textContent = rs.address;
                                                });
                                            });
                                        }

                                        // 调用获取位置函数
                                        getLocation();
                                        // 添加地图点击事件监听器
                                        map.addEventListener("click", function (e) {
                                            // 清除之前的标记
                                            map.clearOverlays();
                                            let point = e.point;
                                            // 在地图上添加标记
                                            let marker = new BMap.Marker(point);
                                            map.addOverlay(marker);
                                            // 反向地理编码，获取地址信息
                                            let geoc = new BMap.Geocoder();
                                            geoc.getLocation(point, function (rs) {
                                                document.getElementById("address").textContent = rs.address;
                                            });
                                        });
                                        // 地图搜索功能
                                        let searchInput = document.getElementById("search-input");
                                        let searchButton = document.getElementById("search-button");
                                        searchButton.addEventListener("click", function () {
                                            let keyword = searchInput.value.trim();
                                            if (keyword !== "") {
                                                let local = new BMap.LocalSearch(map, {
                                                    onSearchComplete: function (LocalResult) {
                                                        if (local.getStatus() === BMAP_STATUS_SUCCESS) {
                                                            if (LocalResult && LocalResult.getNumPois() > 0) {
                                                                let point = LocalResult.getPoi(0).point;
                                                                map.clearOverlays();
                                                                let marker = new BMap.Marker(point);
                                                                map.addOverlay(marker);
                                                                map.panTo(point); // 居中显示搜索结果的坐标点
                                                                map.setZoom(14); // 设置缩放级别
                                                                document.getElementById("address").textContent = LocalResult.getPoi(0).address;
                                                            }
                                                        }
                                                    }
                                                });
                                                local.search(keyword);
                                            }
                                        });
                                        map.addEventListener("mouseover", function () {
                                            map.enableScrollWheelZoom(); // 启用滚轮缩放
                                        });
                                        map.addEventListener("mouseout", function () {
                                            map.disableScrollWheelZoom(); // 关闭滚轮缩放
                                        });
                                    </script>
                                </div>
                            </form>
                        </div>
                    </div>
                    <div class="col-xl-5 offset-xl-1 col-lg-6 mt-md--40">
                        <div class="order-details">
                            <div class="checkout-title mt--10">
                                <h2>您的订单</h2>
                            </div>
                            <div class="table-content table-responsive mb--30">
                                <table class="table order-table order-table-2">
                                    <thead>
                                    <tr>
                                        <th>产品</th>
                                        <th class="text-right">价格</th>
                                        <th class="text-right">数量</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <th></th>
                                        <td class="text-right"></td>
                                        <td class="text-right"></td>
                                    </tr>
                                    </tbody>
                                    <tfoot>
                                    <tr class="order-total">
                                        <th>订单总价</th>
                                        <td class="text-right"><span class="order-total-ammount"></span></td>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                            <div class="checkout-payment">
                                <form action="#" class="payment-form">
                                    <div class="payment-group mb--10">
                                        <div class="payment-radio">
                                            <input checked="" id="bank" name="payment-method" type="radio" value="zfb">
                                            <label class="payment-label" for="bank">支付宝</label>
                                        </div>
                                    </div>
                                    <div class="payment-group mt--20">
                                        <p class="mb--15">您的信息将用于处理您的订单，我们承诺不用于其他目的</p>
                                        <button class="btn btn-size-md btn-fullwidth" type="button"
                                                data-bs-target="#payModal"
                                                data-bs-toggle="modal" onclick="payOrder()">下订单
                                        </button>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                    <!-- Checkout Area End -->
                </div>
            </div>
        </div>
    </div>
    <!-- Main Content Wrapper Start -->
    <!-- Footer Start-->
    <footer class="footer bg-color" data-bg-color="#f4f8fa">
        <div class="footer-top">
            <div class="container-fluid">
                <div class="row border-bottom pt--70 pb--70">
                    <div class="col-lg-3 col-sm-6 offset-md-1 offset-lg-0 mb-md--45">
                        <div class="footer-widget">
                            <div class="textwidget">
                                <figure class="footer-logo mb--30">
                                    <img src="senshi_official_website/static/logo1.png" width="50%" height="50%"
                                         alt="Logo">
                                </figure>
                                <p>
                                    追求品质生活，打造更舒服的家居生活就选择森饰家具，给自己一份放心，更是给自己的一份安心</p>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-2 col-sm-3 offset-lg-1 offset-sm-2 mb-md--45">
                        <div class="footer-widget">
                            <h3 class="widget-title mb--35 mb-sm--20">公司简介</h3>
                            <div class="footer-widget">
                                <ul class="footer-menu">
                                    <li><a href="">关于我们</a></li>
                                    <li><a href="#">事务</a></li>
                                    <li><a href="contact-us.html">联系我们</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-2 col-sm-4 offset-md-1 offset-lg-0 mb-xs--45">
                        <div class="footer-widget">
                            <h3 class="widget-title mb--35 mb-sm--20">产品</h3>
                            <div class="footer-widget">
                                <ul class="footer-menu">
                                    <li><a href="#">价格</a></li>
                                    <li><a href="#">产品特征</a></li>
                                    <li><a href="#">客户</a></li>
                                    <li><a href="#">演示</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-2 col-sm-4 mb-xs--45">
                        <div class="footer-widget">
                            <h3 class="widget-title mb--35 mb-sm--20">帮助</h3>
                            <div class="footer-widget">
                                <ul class="footer-menu">
                                    <li><a href="#">介绍</a></li>
                                    <li><a href="#">反馈</a></li>
                                    <li><a href="#">首页</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-2 col-md-3 col-sm-4">
                        <div class="footer-widget">
                            <h3 class="widget-title mb--35 mb-sm--20">社交</h3>
                            <div class="footer-widget">
                                <ul class="footer-menu">
                                    <li><a href="#">脸书</a></li>
                                    <li><a href="#">推特</a></li>
                                    <li><a href="#">领英</a></li>
                                    <li><a href="#">Google +</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="footer-middle ptb--40">
            <div class="container">
                <div class="row justify-content-center">
                    <div class="col-lg-11">
                        <div class="footer-widget">
                            <div class="taglist">
                                <a href="#">隐私政策</a>
                                <a href="#">缺陷披露政策</a>
                                <a href="#">使用条款</a>
                                <a href="#">上海工商</a>
                                <a href="#">沪公网安备31010402001234号</a>
                                <a href="#">沪ICP备170555232号</a>
                                <a href="#">Cookies设置</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </footer>
    <!-- Footer End-->

    <!-- OffCanvas Menu Start -->
    <div class="offcanvas-menu-wrapper" id="offcanvasMenu">
        <div class="offcanvas-menu-inner">
            <a class="btn-close" href="">
                <i class="la la-remove"></i>
            </a>
            <nav class="offcanvas-navigation">
                <ul class="offcanvas-menu">
                    <li class="menu-item-has-children active">
                        <a href="index.html">首页</a>
                    </li>
                    <li class="menu-item-has-children">
                        <a href="goCart">购物</a>
                    </li>
                    <li class="menu-item-has-children">
                        <a href="#">个人中心</a>
                        <ul class="sub-menu">
                            <li>
                                <a href="goMyAccount">我的账号</a>
                            </li>
                            <li>
                                <a href="goCart">购物车</a>
                            </li>

                            <li>
                                <a href="goTracking">跟踪订单</a>
                            </li>

                        </ul>
                    </li>
                    <li>
                        <a href="contact-us.html">联系我们</a>
                    </li>
                </ul>
                <div class="site-info vertical">
                    <div class="site-info__item">
                        <a href="tel:+01223566678"><strong>+01 2235 666 78</strong></a>
                        <a href="mailto:Support@contixs.com">Support@furtrate.com</a>
                    </div>
                </div>
            </nav>
        </div>
    </div>
    <!-- OffCanvas Menu End -->


    <!-- Mini Cart Start -->
    <aside class="mini-cart" id="miniCart">
        <div class="mini-cart-wrapper">
            <div class="mini-cart__close">
                <a class="btn-close" href="#"><i class="la la-remove"></i></a>
            </div>
            <div class="mini-cart-inner">
                <h3 class="mini-cart__heading mb--45">Shopping Cart</h3>
                <div class="mini-cart__content">
                    <ul class="mini-cart__list">
                        <li class="mini-cart__product">
                            <a class="mini-cart__product-remove" href="#">
                                <i class="la la-remove"></i>
                            </a>
                            <div class="mini-cart__product-image">
                                <img alt="products"
                                     src="<%=request.getContextPath() %>/senshi_official_website/static/picture/prod-01-100x100.jpg">
                            </div>
                            <div class="mini-cart__product-content">
                                <a class="mini-cart__product-title"
                                   href="<%=request.getContextPath() %>/senshi_official_website/product-details.html">Golden
                                    Easy Spot
                                    Chair.</a>
                                <span class="mini-cart__product-quantity">1 x $49.00</span>
                            </div>
                        </li>
                        <li class="mini-cart__product">
                            <a class="mini-cart__product-remove" href="#">
                                <i class="la la-remove"></i>
                            </a>
                            <div class="mini-cart__product-image">
                                <img alt="products"
                                     src="<%=request.getContextPath() %>/senshi_official_website/static/picture/prod-02-100x100.jpg">
                            </div>
                            <div class="mini-cart__product-content">
                                <a class="mini-cart__product-title"
                                   href="<%=request.getContextPath() %>/senshi_official_website/product-details.html">Golden
                                    Easy Spot
                                    Chair.</a>
                                <span class="mini-cart__product-quantity">1 x $49.00</span>
                            </div>
                        </li>
                        <li class="mini-cart__product">
                            <a class="mini-cart__product-remove" href="#">
                                <i class="la la-remove"></i>
                            </a>
                            <div class="mini-cart__product-image">
                                <img alt="products"
                                     src="<%=request.getContextPath() %>/senshi_official_website/static/picture/prod-03-100x100.jpg">
                            </div>
                            <div class="mini-cart__product-content">
                                <a class="mini-cart__product-title"
                                   href="<%=request.getContextPath() %>/senshi_official_website/product-details.html">Golden
                                    Easy Spot
                                    Chair.</a>
                                <span class="mini-cart__product-quantity">1 x $49.00</span>
                            </div>
                        </li>
                    </ul>
                    <div class="mini-cart__total">
                        <span>Subtotal</span>
                        <span class="ammount">$98.00</span>
                    </div>
                    <div class="mini-cart__buttons">
                        <a class="btn btn-fullwidth btn-bg-primary mb--20" href="goCart">查看购物车</a>
                        <a class="btn btn-fullwidth btn-bg-primary" href="">结账</a>
                    </div>
                </div>
            </div>
        </div>
    </aside>
    <!-- Mini Cart End -->

    <!-- Searchform Popup Start -->
    <div class="searchform__popup" id="searchForm">
        <a class="btn-close" href="#"><i class="la la-remove"></i></a>
        <div class="searchform__body">
            <p>Start typing and press Enter to search</p>
            <form class="searchform">
                <input class="searchform__input" id="popup-search" name="popup-search"
                       placeholder="Search Entire Store..."
                       type="text">
                <button class="searchform__submit" type="submit"><i class="la la-search"></i></button>
            </form>
        </div>
    </div>
    <!-- Searchform Popup End -->

    <!-- Qicuk View Modal Start -->
    <div class="modal fade product-modal" id="payModal" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content" width="100px">
                <div class="modal-body">
                    <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true"><i class="la la-remove"></i></span>
                    </button>
                    <div class="row" id="pay_show">
                        <div class="col-lg-12">
                            <div class="modal-box product-summary" align="center">
                                <div id="qrCodeImg"></div>
                                <br>
                                <button class="btn btn-size-md btn-fullwidth" type="button" onclick="queryOrder()">
                                    已完成支付
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Qicuk View Modal End -->

    <!-- Global Overlay Start -->
    <div class="global-overlay"></div>
    <!-- Global Overlay End -->

    <!-- Global Overlay Start -->
    <a class="scroll-to-top" href=""><i class="la la-angle-double-up"></i></a>
    <!-- Global Overlay End -->
</div>
<!-- Main Wrapper End -->


<!-- ************************* JS Files ************************* -->

<!-- jQuery JS -->
<script src="<%=request.getContextPath() %>/senshi_official_website/static/js/vendor.js"></script>

<!-- Main JS -->
<script src="<%=request.getContextPath() %>/senshi_official_website/static/js/main.js"></script>
<script src="https://cdn.jsdelivr.net/npm/qrcodejs2"></script>
</body>
<script>
    let salesOrderId;
    $(function () {
        init()
    })

    function init() {
        let name = "${sessionScope.consumer.consumerName}";

        if (name !== "" && name != null) {
            $("#userName").html("欢迎" + name);
        } else {
            $("#userName").html = "登录 & 注册";
        }
    }

    $(function () {
        const phone = "${sessionScope.consumer.consumerPhone}";
        getCart(phone);
    })

    function getCart(phoneNumber) {
        let orderTable = $('.order-table tbody');
        let orderTotalAmount = $('.order-total-ammount');
        // 清空订单表格和订单总价
        orderTable.empty();
        orderTotalAmount.text('');
        let total = 0;
        $.ajax({
            url: "shopCart/" + phoneNumber,
            dataType: "json",
            type: "GET",
            contentType: "application/json; charset=UTF-8",
            success: function (data) {
                $.each(data.data, function (index, order) {
                    // 创建订单行
                    let row = $('<tr>');
                    let productName = $('<th>').text(order.productName);
                    let price = $('<td>').addClass('text-right').text(order.price);
                    let quantity = $('<td>').addClass('text-right').text(order.productQuantity);
                    row.append(productName, price, quantity);
                    orderTable.append(row);
                    total += order.price * order.productQuantity;
                });
                // 设置订单总价
                let totalAmount = total;
                orderTotalAmount.text(totalAmount);
            }
        })
    }

    function payOrder() {
        $("#qrCodeImg").empty();
        let name = "${sessionScope.consumer.consumerName}";
        let phone = "${sessionScope.consumer.consumerPhone}";
        let address = $("#address").text();
        let data = {customName: name, customPhone: phone, customAddress: address};
        data = JSON.stringify(data);
        $.ajax({
            url: "checkout/payOrder",
            dataType: "json",
            type: "post",
            data: data,
            contentType: "application/json; charset=UTF-8",
            success: function (data) {
                let paymentCode = data.data.code;
                salesOrderId = data.data.OrderId;
                let qrCode = new QRCode("qrCodeImg", {
                    text: paymentCode,
                    width: 256,
                    height: 256
                });
            }
        })
    }

    function queryOrder() {
        let data = {salesOrderId: salesOrderId}
        $.ajax({
            url: "checkout/queryOrder",
            dataType: "json",
            type: "get",
            data: data,
            contentType: "application/json; charset=UTF-8",
            success: function (data) {
                if (data.code == 200) {
                    alert(data.msg);
                    window.location.replace("shop-three-columns.jsp");
                } else {
                    alert(data.msg);
                }
            }
        })
    }
</script>
</html>